<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>API: svg   drawmode.js  (YUI Library)</title>

	<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css?stamp=1316139452.08" />
	<link rel="stylesheet" type="text/css" href="assets/api.css?stamp=1316139452.08" />

    <script type="text/javascript" src="assets/api-js?stamp=1316139452.08"></script>
    <script type="text/javascript" src="assets/ac-js?stamp=1316139452.08"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">
	<div id="hd">
        <h1><a href="http://developer.yahoo.com/yui/" title="g-javascript-lib">g-javascript-lib</a></h1>
        <h3>svg&nbsp; <span class="subtitle">1.0.0</span></h3>
        <a href="./index.html" title="g-javascript-lib">g-javascript-lib</a> 
            &gt; <a href="./module_svg.html" title="svg">svg</a>
                
                 &gt; drawmode.js (source view) 
        <form onsubmit="return false">
            <div id="propertysearch">
                Search: <input autocomplete="off" id="searchinput" />
                <div id="searchresults">
                    &nbsp;
                </div>
            </div>
        </form>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
                <fieldset>
                    <legend>Filters</legend>
                <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
                <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
                <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
                </fieldset>
            </form>

                    <div id="srcout">
                        <style>
                            #doc3 .classopts { display:none; }
                        </style>
<div class="highlight"><pre><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>


	<span class="kd">var</span> <span class="nx">DrawSelect</span> <span class="o">=</span> <span class="p">{</span>
		<span class="nx">name</span><span class="o">:</span> <span class="s1">&#39;Select mode&#39;</span><span class="p">,</span>
		<span class="nx">init</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">_emGridBox</span><span class="p">.</span><span class="nx">style</span><span class="p">.</span><span class="nx">cursor</span> <span class="o">=</span> <span class="s1">&#39;default&#39;</span><span class="p">;</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">_emCursorBox</span><span class="p">.</span><span class="nx">style</span><span class="p">.</span><span class="nx">display</span> <span class="o">=</span> <span class="s1">&#39;none&#39;</span><span class="p">;</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">dragObj</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
		<span class="p">},</span>
		<span class="nx">onmousedown</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">evt</span><span class="p">,</span> <span class="nx">p</span><span class="p">)</span> <span class="p">{</span>
			<span class="kd">var</span> <span class="nx">obj</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">find_event_obj</span><span class="p">(</span><span class="nx">evt</span><span class="p">);</span>
			<span class="k">if</span> <span class="p">(</span><span class="nx">obj</span><span class="p">)</span> <span class="p">{</span>
				<span class="nx">obj</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;class&#39;</span><span class="p">,</span> <span class="s1">&#39;fly&#39;</span><span class="p">);</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_dragObj</span> <span class="o">=</span> <span class="nx">obj</span><span class="p">;</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_dragStart</span> <span class="o">=</span> <span class="nx">p</span><span class="p">;</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_dragObjOrig</span> <span class="o">=</span> <span class="p">{</span>
					<span class="nx">x</span><span class="o">:</span> <span class="nb">parseInt</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">_dragObj</span><span class="p">.</span><span class="nx">getAttribute</span><span class="p">(</span><span class="s1">&#39;x&#39;</span><span class="p">)),</span>
					<span class="nx">y</span><span class="o">:</span> <span class="nb">parseInt</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">_dragObj</span><span class="p">.</span><span class="nx">getAttribute</span><span class="p">(</span><span class="s1">&#39;y&#39;</span><span class="p">))</span>
				<span class="p">}</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_dragObj</span><span class="p">.</span><span class="nx">onmouseup</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
					
				<span class="p">}</span>
			<span class="p">}</span>
		<span class="p">},</span>
		<span class="nx">onmouseup</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">evt</span><span class="p">,</span> <span class="nx">p</span><span class="p">)</span> <span class="p">{</span>
			<span class="k">if</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">_dragObj</span><span class="p">)</span> <span class="p">{</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_dragObj</span><span class="p">.</span><span class="nx">removeAttribute</span><span class="p">(</span><span class="s1">&#39;class&#39;</span><span class="p">);</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_dragObj</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
			<span class="p">}</span>
		<span class="p">},</span>
		<span class="nx">onmousemove</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">evt</span><span class="p">,</span> <span class="nx">p</span><span class="p">)</span> <span class="p">{</span>
			<span class="k">if</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">_dragObj</span><span class="p">)</span> <span class="p">{</span>
				<span class="kd">var</span> <span class="nx">o</span>  <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">_dragObjOrig</span><span class="p">;</span>
				<span class="kd">var</span> <span class="nx">dx</span> <span class="o">=</span> <span class="nx">p</span><span class="p">.</span><span class="nx">x</span> <span class="o">-</span> <span class="k">this</span><span class="p">.</span><span class="nx">_dragStart</span><span class="p">.</span><span class="nx">x</span><span class="p">;</span>
				<span class="kd">var</span> <span class="nx">dy</span> <span class="o">=</span> <span class="nx">p</span><span class="p">.</span><span class="nx">y</span> <span class="o">-</span> <span class="k">this</span><span class="p">.</span><span class="nx">_dragStart</span><span class="p">.</span><span class="nx">y</span><span class="p">;</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_dragObj</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;x&#39;</span><span class="p">,</span> <span class="nx">o</span><span class="p">.</span><span class="nx">x</span> <span class="o">+</span> <span class="nx">dx</span><span class="p">);</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_dragObj</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;y&#39;</span><span class="p">,</span> <span class="nx">o</span><span class="p">.</span><span class="nx">y</span> <span class="o">+</span> <span class="nx">dy</span><span class="p">);</span>
			<span class="p">}</span>
		<span class="p">},</span>
		<span class="nx">onclick</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">evt</span><span class="p">)</span> <span class="p">{</span>
		<span class="p">},</span>
		<span class="nx">deinit</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">_emGridBox</span><span class="p">.</span><span class="nx">style</span><span class="p">.</span><span class="nx">cursor</span> <span class="o">=</span> <span class="s1">&#39;none&#39;</span><span class="p">;</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">_emCursorBox</span><span class="p">.</span><span class="nx">style</span><span class="p">.</span><span class="nx">display</span> <span class="o">=</span> <span class="s1">&#39;block&#39;</span><span class="p">;</span>
		<span class="p">}</span>
	<span class="p">}</span>

	<span class="cm">/*</span>
<span class="cm">	 *</span>
<span class="cm">	 */</span>
	<span class="kd">var</span> <span class="nx">DrawLine</span> <span class="o">=</span> <span class="p">{</span>
		<span class="nx">name</span><span class="o">:</span> <span class="s1">&#39;Draw line&#39;</span><span class="p">,</span>
		<span class="nx">init</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span> 
			<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
		<span class="p">},</span>
		<span class="nx">onmousedown</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ev</span><span class="p">,</span> <span class="nx">p</span><span class="p">)</span> <span class="p">{</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span> <span class="o">=</span> <span class="p">{</span>
				<span class="nx">x1</span><span class="o">:</span> <span class="nx">p</span><span class="p">.</span><span class="nx">x</span><span class="p">,</span>
				<span class="nx">y1</span><span class="o">:</span> <span class="nx">p</span><span class="p">.</span><span class="nx">y</span><span class="p">,</span>
				<span class="nx">x2</span><span class="o">:</span> <span class="nx">p</span><span class="p">.</span><span class="nx">x</span><span class="p">,</span>
				<span class="nx">y2</span><span class="o">:</span> <span class="nx">p</span><span class="p">.</span><span class="nx">y</span><span class="p">,</span>
				<span class="nx">line</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>
			<span class="p">}</span>
		<span class="p">},</span>
		<span class="nx">onmousemove</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ev</span><span class="p">,</span> <span class="nx">p</span><span class="p">)</span> <span class="p">{</span>
			<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">)</span>	<span class="k">return</span><span class="p">;</span>
			<span class="kd">var</span> <span class="nx">x2</span> <span class="o">=</span> <span class="nx">p</span><span class="p">.</span><span class="nx">x</span><span class="p">;</span>
			<span class="kd">var</span> <span class="nx">y2</span> <span class="o">=</span> <span class="nx">p</span><span class="p">.</span><span class="nx">y</span><span class="p">;</span>
			<span class="kd">var</span> <span class="nx">x1</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">x1</span><span class="p">;</span>
			<span class="kd">var</span> <span class="nx">y1</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">y1</span><span class="p">;</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">x2</span> <span class="o">=</span> <span class="nx">x2</span><span class="p">;</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">y2</span> <span class="o">=</span> <span class="nx">y2</span><span class="p">;</span>

			<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">line</span><span class="p">)</span> <span class="p">{</span>
				<span class="kd">var</span> <span class="nx">line</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">_create_element</span><span class="p">(</span><span class="s1">&#39;line&#39;</span><span class="p">,</span> <span class="p">{</span><span class="nx">x1</span><span class="o">:</span> <span class="nx">x1</span><span class="p">,</span> <span class="nx">y1</span><span class="o">:</span> <span class="nx">y1</span><span class="p">,</span> <span class="nx">x2</span><span class="o">:</span> <span class="nx">x2</span><span class="p">,</span> <span class="nx">y2</span><span class="o">:</span> <span class="nx">y2</span><span class="p">,</span> <span class="kr">class</span><span class="o">:</span> <span class="s1">&#39;fly&#39;</span><span class="p">});</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_drawBox</span><span class="p">.</span><span class="nx">em</span><span class="p">.</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">line</span><span class="p">);</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">line</span> <span class="o">=</span> <span class="nx">line</span><span class="p">;</span>
			<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">line</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;x2&#39;</span><span class="p">,</span> <span class="nx">x2</span><span class="p">);</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">line</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s1">&#39;y2&#39;</span><span class="p">,</span> <span class="nx">y2</span><span class="p">);</span>
			<span class="p">}</span>
		<span class="p">},</span>
		<span class="nx">onmouseup</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ev</span><span class="p">)</span> <span class="p">{</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
		<span class="p">},</span>
		<span class="nx">onclick</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ev</span><span class="p">)</span> <span class="p">{</span>
		<span class="p">}</span>
	<span class="p">}</span>

	<span class="kd">var</span> <span class="nx">DrawLineClick</span> <span class="o">=</span> <span class="p">{</span>
		<span class="nx">name</span><span class="o">:</span> <span class="s1">&#39;Draw line on click&#39;</span><span class="p">,</span>
		<span class="nx">init</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span> 
			<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
		<span class="p">},</span>
		<span class="nx">onclick</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ev</span><span class="p">,</span> <span class="nx">p</span><span class="p">)</span> <span class="p">{</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">fly_line</span><span class="p">(</span><span class="nx">p</span><span class="p">);</span>
			<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">)</span> <span class="p">{</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span> <span class="o">=</span> <span class="p">{</span>
					<span class="nx">start</span><span class="o">:</span> <span class="nx">p</span><span class="p">,</span>
					<span class="nx">end</span><span class="o">:</span> <span class="kc">null</span>
				<span class="p">}</span>
			<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">end</span> <span class="o">=</span> <span class="nx">p</span><span class="p">;</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">fly_end</span><span class="p">(</span><span class="nx">p</span><span class="p">);</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">add_shape</span><span class="p">(</span><span class="s1">&#39;line&#39;</span><span class="p">,</span> <span class="p">{</span>
					<span class="nx">x1</span><span class="o">:</span> <span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">start</span><span class="p">.</span><span class="nx">x</span><span class="p">,</span>
					<span class="nx">y1</span><span class="o">:</span> <span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">start</span><span class="p">.</span><span class="nx">y</span><span class="p">,</span>
					<span class="nx">x2</span><span class="o">:</span> <span class="nx">p</span><span class="p">.</span><span class="nx">x</span><span class="p">,</span>
					<span class="nx">y2</span><span class="o">:</span> <span class="nx">p</span><span class="p">.</span><span class="nx">y</span>
				<span class="p">});</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
			<span class="p">}</span>
		<span class="p">},</span>
		<span class="nx">onmousemove</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ev</span><span class="p">,</span> <span class="nx">p</span><span class="p">)</span> <span class="p">{</span>
			<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">)</span>	<span class="k">return</span><span class="p">;</span>

			<span class="k">this</span><span class="p">.</span><span class="nx">fly_line</span><span class="p">(</span><span class="nx">p</span><span class="p">);</span>
		<span class="p">},</span>
		<span class="nx">onmouseup</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ev</span><span class="p">)</span> <span class="p">{</span> <span class="p">},</span>
		<span class="nx">onmousedown</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ev</span><span class="p">)</span> <span class="p">{</span> <span class="p">}</span>
	<span class="p">}</span>

	<span class="kd">var</span> <span class="nx">DrawRect</span> <span class="o">=</span> <span class="p">{</span>
		<span class="nx">name</span><span class="o">:</span> <span class="s1">&#39;Draw Rectangle&#39;</span><span class="p">,</span>
		<span class="nx">init</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
		<span class="p">},</span>
		<span class="nx">onclick</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">evt</span><span class="p">,</span> <span class="nx">p</span><span class="p">)</span> <span class="p">{</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">fly_rect</span><span class="p">(</span><span class="nx">p</span><span class="p">);</span>
			<span class="k">if</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span> <span class="o">==</span> <span class="kc">null</span><span class="p">)</span> <span class="p">{</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span> <span class="o">=</span> <span class="p">{</span> <span class="nx">start</span><span class="o">:</span> <span class="nx">p</span><span class="p">,</span> <span class="nx">end</span><span class="o">:</span> <span class="kc">null</span> <span class="p">};</span>
			<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">end</span> <span class="o">=</span> <span class="nx">p</span><span class="p">;</span>
				<span class="nx">rect</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">clone_fly_shape</span><span class="p">();</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">add_shape</span><span class="p">(</span><span class="nx">rect</span><span class="p">);</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">fly_end</span><span class="p">(</span><span class="nx">p</span><span class="p">);</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
			<span class="p">}</span>
		<span class="p">},</span>
		<span class="nx">onmousemove</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">evt</span><span class="p">,</span> <span class="nx">p</span><span class="p">)</span> <span class="p">{</span>
			<span class="k">if</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">)</span> <span class="p">{</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">fly_rect</span><span class="p">(</span><span class="nx">p</span><span class="p">);</span>
			<span class="p">}</span>
		<span class="p">}</span>
	<span class="p">}</span>


	<span class="kd">var</span> <span class="nx">DrawPolyline</span> <span class="o">=</span> <span class="p">{</span>
		<span class="nx">name</span><span class="o">:</span> <span class="s1">&#39;Draw Polyline&#39;</span><span class="p">,</span>
		<span class="nx">init</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span> 
			<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span> <span class="o">=</span> <span class="p">[];</span>
		<span class="p">},</span>
		<span class="nx">onclick</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ev</span><span class="p">,</span> <span class="nx">p</span><span class="p">)</span> <span class="p">{</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">fly_line</span><span class="p">(</span><span class="nx">p</span><span class="p">);</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">fly_end</span><span class="p">();</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">fly_start_line</span><span class="p">(</span><span class="nx">p</span><span class="p">);</span>
			<span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">p</span><span class="p">);</span>
		<span class="p">},</span>
		<span class="nx">onmousemove</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ev</span><span class="p">,</span> <span class="nx">p</span><span class="p">)</span> <span class="p">{</span>
			<span class="k">if</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">_drawContext</span><span class="p">.</span><span class="nx">length</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
				<span class="k">this</span><span class="p">.</span><span class="nx">fly_line</span><span class="p">(</span><span class="nx">p</span><span class="p">);</span>
			<span class="p">}</span>
		<span class="p">},</span>
		<span class="nx">onmouseup</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ev</span><span class="p">)</span> <span class="p">{</span> <span class="p">},</span>
		<span class="nx">onmousedown</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ev</span><span class="p">)</span> <span class="p">{</span> <span class="p">},</span>
		<span class="nx">deinit</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
		<span class="p">}</span>
	<span class="p">}</span>


	<span class="nx">G</span><span class="p">.</span><span class="nx">SVG</span><span class="p">.</span><span class="nx">Board</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">_DrawMode</span> <span class="o">=</span> <span class="p">{</span>
		<span class="nx">select</span><span class="o">:</span> <span class="nx">DrawSelect</span><span class="p">,</span>
		<span class="nx">line</span><span class="o">:</span> <span class="nx">DrawLine</span><span class="p">,</span>
		<span class="nx">rect</span><span class="o">:</span> <span class="nx">DrawRect</span><span class="p">,</span>
		<span class="nx">lineclick</span><span class="o">:</span> <span class="nx">DrawLineClick</span><span class="p">,</span>
		<span class="nx">pathclick</span><span class="o">:</span> <span class="nx">DrawPolyline</span><span class="p">,</span>


	<span class="p">}</span>

 <span class="p">})();</span>
</pre></div>
                    </div>
			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div id="moduleList" class="module">
                        <h4>Modules</h4>
                        <ul class="content">
                                <li class=""><a href="module_base.html" title="base">base</a></li>
                                <li class="selected"><a href="module_svg.html" title="svg">svg</a></li>
                                <li class=""><a href="module_test.html" title="test">test</a></li>
                                <li class=""><a href="module_utils.html" title="utils">utils</a></li>
                                <li class=""><a href="module_widget.html" title="widget">widget</a></li>
                        </ul>
                    </div>

                    <div id="classList" class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class=""><a href="SVG.Board.html" title="SVG.Board">SVG.Board</a></li>
                        </ul>
                    </div>

                    <div id="fileList" class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class="selected"><a href="drawmode.js.html" title="drawmode.js">drawmode.js</a></li>
                                <li class=""><a href="test.js.html" title="test.js">test.js</a></li>
                        </ul>
                    </div>





            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2011 Yahoo! Inc. All rights reserved.
	</div>
</div>
<script type="text/javascript">
    ALL_YUI_PROPS = [{"url": "SVG.Board.html#method_add_background", "access": "", "host": "SVG.Board", "type": "method", "name": "add_background"}, {"url": "SVG.Board.html#method_add_element", "access": "", "host": "SVG.Board", "type": "method", "name": "add_element"}, {"url": "SVG.Board.html#method_add_use", "access": "", "host": "SVG.Board", "type": "method", "name": "add_use"}, {"url": "SVG.Board.html#method_def_symbol", "access": "", "host": "SVG.Board", "type": "method", "name": "def_symbol"}, {"url": "SVG.Board.html#method__draw_cursor", "access": "", "host": "SVG.Board", "type": "method", "name": "_draw_cursor"}, {"url": "SVG.Board.html#method__draw_grid", "access": "", "host": "SVG.Board", "type": "method", "name": "_draw_grid"}, {"url": "SVG.Board.html#method_find_event_obj", "access": "", "host": "SVG.Board", "type": "method", "name": "find_event_obj"}, {"url": "SVG.Board.html#method__fix_scale", "access": "", "host": "SVG.Board", "type": "method", "name": "_fix_scale"}, {"url": "SVG.Board.html#method_load_hot_key", "access": "", "host": "SVG.Board", "type": "method", "name": "load_hot_key"}, {"url": "SVG.Board.html#method__map_mouse_matrix", "access": "", "host": "SVG.Board", "type": "method", "name": "_map_mouse_matrix"}, {"url": "SVG.Board.html#method_mirror", "access": "", "host": "SVG.Board", "type": "method", "name": "mirror"}, {"url": "SVG.Board.html#method_move_cursor", "access": "", "host": "SVG.Board", "type": "method", "name": "move_cursor"}, {"url": "SVG.Board.html#method__on_resize", "access": "", "host": "SVG.Board", "type": "method", "name": "_on_resize"}, {"url": "SVG.Board.html#method_remove_element", "access": "", "host": "SVG.Board", "type": "method", "name": "remove_element"}, {"url": "SVG.Board.html#method_render", "access": "", "host": "SVG.Board", "type": "method", "name": "render"}, {"url": "SVG.Board.html#method_set_grid", "access": "", "host": "SVG.Board", "type": "method", "name": "set_grid"}, {"url": "SVG.Board.html#method_set_scale_step", "access": "", "host": "SVG.Board", "type": "method", "name": "set_scale_step"}, {"url": "SVG.Board.html#method_set_size", "access": "", "host": "SVG.Board", "type": "method", "name": "set_size"}, {"url": "SVG.Board.html#method_set_view", "access": "", "host": "SVG.Board", "type": "method", "name": "set_view"}, {"url": "SVG.Board.html#method__snap_to_grid", "access": "", "host": "SVG.Board", "type": "method", "name": "_snap_to_grid"}, {"url": "SVG.Board.html#method__update_matrix", "access": "", "host": "SVG.Board", "type": "method", "name": "_update_matrix"}, {"url": "SVG.Board.html#method__update_scale_range", "access": "", "host": "SVG.Board", "type": "method", "name": "_update_scale_range"}, {"url": "SVG.Board.html#method_view_grid", "access": "", "host": "SVG.Board", "type": "method", "name": "view_grid"}, {"url": "SVG.Board.html#method_zoom_fit", "access": "", "host": "SVG.Board", "type": "method", "name": "zoom_fit"}];
</script>
</body>
</html>
